package view;


import javax.swing.JFrame;
import javax.swing.SpringLayout;
import javax.swing.JTabbedPane;
import javax.swing.JSeparator;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;


/*
 * GUI
 */
public class Project_Manager extends JFrame {
	private JTable table;
	public Project_Manager() {
		SpringLayout springLayout = new SpringLayout();
		getContentPane().setLayout(springLayout);
		
		JSeparator separator = new JSeparator();
		springLayout.putConstraint(SpringLayout.NORTH, separator, 53, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, separator, 10, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, separator, 55, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, separator, -10, SpringLayout.EAST, getContentPane());
		getContentPane().add(separator);
		
		JSeparator separator_1 = new JSeparator();
		springLayout.putConstraint(SpringLayout.NORTH, separator_1, -54, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, separator_1, 10, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, separator_1, -52, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, separator_1, -10, SpringLayout.EAST, getContentPane());
		getContentPane().add(separator_1);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		springLayout.putConstraint(SpringLayout.NORTH, tabbedPane, 6, SpringLayout.SOUTH, separator);
		springLayout.putConstraint(SpringLayout.WEST, tabbedPane, 0, SpringLayout.WEST, separator);
		springLayout.putConstraint(SpringLayout.SOUTH, tabbedPane, -14, SpringLayout.NORTH, separator_1);
		springLayout.putConstraint(SpringLayout.EAST, tabbedPane, 0, SpringLayout.EAST, separator);
		getContentPane().add(tabbedPane);
		
		JPanel panel = new JPanel();
		tabbedPane.addTab("STATUS", null, panel, null);
		
		JPanel panel_1 = new JPanel();
		tabbedPane.addTab("SORTING", null, panel_1, null);
		SpringLayout sl_panel_1 = new SpringLayout();
		panel_1.setLayout(sl_panel_1);
		
		JSeparator separator_2 = new JSeparator();
		sl_panel_1.putConstraint(SpringLayout.NORTH, separator_2, 112, SpringLayout.NORTH, panel_1);
		sl_panel_1.putConstraint(SpringLayout.WEST, separator_2, 10, SpringLayout.WEST, panel_1);
		sl_panel_1.putConstraint(SpringLayout.SOUTH, separator_2, 114, SpringLayout.NORTH, panel_1);
		sl_panel_1.putConstraint(SpringLayout.EAST, separator_2, 458, SpringLayout.WEST, panel_1);
		panel_1.add(separator_2);
		
		JLabel lblDate = new JLabel("DATE:");
		sl_panel_1.putConstraint(SpringLayout.NORTH, lblDate, 31, SpringLayout.NORTH, panel_1);
		sl_panel_1.putConstraint(SpringLayout.WEST, lblDate, 0, SpringLayout.WEST, separator_2);
		panel_1.add(lblDate);
		
		JLabel lblFrom = new JLabel("FROM");
		sl_panel_1.putConstraint(SpringLayout.NORTH, lblFrom, 10, SpringLayout.NORTH, panel_1);
		sl_panel_1.putConstraint(SpringLayout.WEST, lblFrom, 110, SpringLayout.WEST, panel_1);
		panel_1.add(lblFrom);
		
		JLabel lblTo = new JLabel("TO");
		sl_panel_1.putConstraint(SpringLayout.NORTH, lblTo, 0, SpringLayout.NORTH, lblFrom);
		sl_panel_1.putConstraint(SpringLayout.WEST, lblTo, 143, SpringLayout.EAST, lblFrom);
		panel_1.add(lblTo);
		
		JButton btnSort = new JButton("SORT");
		sl_panel_1.putConstraint(SpringLayout.WEST, btnSort, 157, SpringLayout.WEST, panel_1);
		sl_panel_1.putConstraint(SpringLayout.SOUTH, btnSort, -6, SpringLayout.NORTH, separator_2);
		panel_1.add(btnSort);
		
		JScrollPane scrollPane = new JScrollPane();
		sl_panel_1.putConstraint(SpringLayout.NORTH, scrollPane, 6, SpringLayout.SOUTH, separator_2);
		sl_panel_1.putConstraint(SpringLayout.WEST, scrollPane, 10, SpringLayout.WEST, separator_2);
		sl_panel_1.putConstraint(SpringLayout.SOUTH, scrollPane, -4, SpringLayout.SOUTH, panel_1);
		sl_panel_1.putConstraint(SpringLayout.EAST, scrollPane, -10, SpringLayout.EAST, panel_1);
		panel_1.add(scrollPane);
		
		table = new JTable();
		table.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"SR.NO.", "INDENT NO.", "GENERATED_BY", "SITE NAME"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false, false, false, false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		scrollPane.setViewportView(table);
		
		JLabel lblClick = new JLabel("CLICK");
		sl_panel_1.putConstraint(SpringLayout.WEST, lblClick, 65, SpringLayout.EAST, lblDate);
		sl_panel_1.putConstraint(SpringLayout.SOUTH, lblClick, 0, SpringLayout.SOUTH, lblDate);
		panel_1.add(lblClick);
		
		JLabel lblClick_1 = new JLabel("CLICK");
		sl_panel_1.putConstraint(SpringLayout.WEST, lblClick_1, 133, SpringLayout.EAST, lblClick);
		sl_panel_1.putConstraint(SpringLayout.SOUTH, lblClick_1, 0, SpringLayout.SOUTH, lblDate);
		panel_1.add(lblClick_1);
	}

	/*
	 * --------------------------------------------------------------------------
	 */
}
